import note.TextAndImageNote;
import note.TextNote;
import notestore.NoteStore;

public class Launcher {

    private static NoteStore ns = new NoteStore();

    public static void main(String[] args) {
        String message = "Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems";
        ns.storeNote(message, null);
        
        // reuse message
        message = "Few books to read - Ikigai, How to win friends and influence people";
        ns.storeNote(message, null);

        message = "The shopping list on my fridge";
        String url = "//foo/bar1/bar2/imgset1.jpg";
        ns.storeNote(message, url);

        // reuse url
        message = "The size label of Jack's shirt";
        url = "//foo/bar1/bar2/imgset2.jpg";
        ns.storeNote(message, url);

        // output task1
        System.out.println("Task1: printing all Text Notes:");
        displayTextNotes();

        // output task2
        System.out.println("");
        System.out.println("Task2: printing all Text and Image Notes:");
        displayTextAndImageNotes();
    }

    // iterate all text notes and print them out
    public static void displayTextNotes() {
        for (TextNote textNote : ns.getAllTextNotes()) {
            textNote.printContent();
        }
    }

    // iterate all text and image notes and print them out
    public static void displayTextAndImageNotes() {
        for (TextAndImageNote imageNote : ns.getAllTextAndImageNotes()) {
            imageNote.printContent();
        }
    }
}